package cn.learn.validator.annotation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * B站最好的参数校验视频
 * https://www.bilibili.com/video/BV1UE411t7BZ?p=7
 * 密码验证标签
 *
 * @author huangyezhan
 * @version 1.0
 * @date 2020年08月01日15:20
 */
@Target({ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = PasswordValidator.class)
public @interface Password {

    String message() default "{密码设置不符合规范}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
